Release 10.1A: OpenEdge Development:
Progress Dynamics Advanced Development
Attribute table
The
ryc_attributetable has these fields:
attribute_label— ThisCHARACTERfield is the name of the attribute. For SmartObject attributes, this is the same as the name in the property include files. For widget attributes, the name is normally the same as the 4GL attribute name (including hyphens, which are otherwise normally avoided in attribute names).attribute_group_obj— ThisDECIMALobject ID points to the attribute group for the attribute.data_type— ThisINTEGERfield holds the data type of the attribute. As you will see in the description of the fields for theattribute_valuetable, Progress Dynamics supports a list of attribute data types corresponding to the native Progress data types, and stores the attribute value in a field of that data type. This field, therefore, identifies which of the attribute value fields actually holds the value for the attribute. Progress Dynamics Version 1 users might be aware that there was anryc_attribute_typetable in Progress Dynamics Version 1. This table has been removed, as the type was really nothing more than the data type, which is now stored here. This is an integer field for performance reasons. The valid values are as follows:attribute_narrative— ThisCHARACTERfield provides a full description of the purpose and use of the attribute.override_type— ThisCHARACTERfield indicates whether the standardgetandsetfunctions must be used to set and retrieve the attribute value. Normally, these functions serve only to permit other application objects to access the properties of a SmartObject, and for access within the object itself and its super procedures, code can directly access the temp-table that holds the object’s attribute values. In that case, this field is blank. Other values this field can take areget, indicating thegetfunction does something specific to retrieve the value and must be executed,set,indicating thesetfunction must be executed to set the value, orget,setindicating both the get and the set functions must be executed. If this field has a value, then the functions to get and/or set this property need to be defined. The functions are executed instead of simply accessing the value directly in order to allow them to contain additional logic beyond simply retrieving the value from the temp-table. This is the equivalent of defining thexppreprocessors in the property include files of the ADM, but is more flexible in that it differentiates betweengetandset.Note that in code that checks this value, a
CAN-DOorLOOKUPshould be used to ensure the order of theget,setpair is irrelevant.runtime_only— This is aLOGICALfield that defaults toNO. If it is set toYES, then the value of this attribute should not be stored in the Repository and is only to be added to the attribute temp-table at run time without an initial default value. An example would be an attribute that stores a handle, as the handle has no context outside of the current session, but still needs to form part of the valid attribute list. Other examples are attributes that store the current state of an object, such asObjectInitialized. There would be no point to assigning such attributes a default value. This field is useful in that it permits tools, such as the dynamic property sheet, to filter out attributes that it is not meaningful to assign a value to at design time.is_private— This is aLOGICALfield that defaults toNO. If it is set toYES, then the value of this attribute is not intended to be accessed outside of the class where it is defined. This field is also used to filter out attributes from the dynamic property sheet and other tools. Generally,getandsetfunctions are not defined for private attributes.constant_level— This is aCHARACTERfield and identifies the level at which a property can be modified. The valid values for this areclass, indicating it can only be specified at the class level,master, indicating that the value can be modified at the master level, andblank, indicating that there are no restrictions on where the attribute can be assigned a value. This field also assists tools, such as the dynamic property sheet, in filtering out attributes from its display. An attribute, such asObjectType, is defined once for the class and should not be changed in a master or instance. A master attribute, such as theObjectName, should not be changed in an instance. Thus, the dynamic property sheet and other tools disable updates to attributes with aconstant_levelof class when you are defining a master or instance, and disable updates to attributes with aconstant_levelof master when you are defining instance attributes for an object in a container. There is also aconstant_valuefield in theattribute_valuetable that is aLOGICALindicating whether further modifications are allowed to the property. The attribute table’sconstant_levelfield therefore affects how theconstant_valueflag is set in theattribute_valuetable.derived_value— This is aLOGICALfield that defaults toNO. It can be set toYESto indicate that the property value is derived from other properties or other run-time information and doesn’t need to be defined in the attribute temp-table or stored in the Repository. Its value is therefore always set and retrieved using itsgetandsetfunctions, which must contain the code needed to determine the value. As an example, theVisualclass has three attributes that provide information derived from thegetSysColorbuilt-in function and theCOLOR-TABLE 4GLobject. These are calledcolor3DFace,color3DHighight, andcolor3DShadow. Because the attribute values are always derived from this system function, there is no need to store the value in the attribute temp-table. Code must always use thegetfunctions to retrieve the values.lookup_type— ThisCHARACTERfield defines the supported means of validating the attribute value for a specific object type. It is used in the dynamic property sheet to determine whether to overlay a combo box, a lookup button, or nothing at all on the attribute value field. Possible values are:
LIST— If thelookup_typeisLIST, then thelookup_valuefield described next contains a string of possible attribute values in list-item-pairs format. In the property sheet, a combo box containing these values will overlay the attribute value field, so that the user must select one of the defined values for the attribute.DIALOG— In this case, thelookup_valuefield contains the relative path and filename of a dialog container where the attribute value can be selected. In the property sheet, a lookup button will overlay the attribute value field. When the user selects the button, the specified dialog box is launched. The user can also enter a value directly without using the dialog.DIALOG-R— This is like theDIALOGoption, but makes the attribute value field read-only, forcing the use of the dialog box. This is necessary for dialog boxes that would return delimited lists that you would not want users to enter manually, or simply to control the value entered.PROC— Here, thelookup_valuefield contains the relative path and filename of a procedure to execute to determine the list of valid attribute values in some special way. The ProgressRETURN-VALUEof the procedure must contain a string of the list-item-pairs used to populate the combo box that overlays the attribute value field.“”— Blank indicates a free text entry. The dynamic property sheet simply enables the browse cell in this case so that the user can enter a value.lookup_value— ThisCHARACTERfield can be used to specify a list of distinct values allowed for this attribute, or it can specify a procedure call that returns a list of values, or it can specify the name of a dialog box, as discussed in the description oflookup_type. When it contains a list, the delimiter must beCHR(3)rather than a comma, to allow for the possibility that a value might itself contain a comma. The value and format of thelookup_valuefield are dependent on the value of thelookup_typefield, as follows:
- If the
lookup_typeis blank, then thelookup_valuefield is blank. Here, there is no restriction on the value the user can enter, and also no assistance in choosing a value.- If the
lookup_type = LIST, then thelookup_valuespecifies theLIST-ITEM-PAIRSvalues. This is a delimited list of labels and values in the form:label1,value1,llabel2,value2,...- If the
lookup_type = DIALOG, then thelookup_valuespecifies the relative path and filename of the dialog box to be run from the property sheet. The dialog procedure must return twoOUTPUTparameters, the first aLOGICALindicating whether the property was changed, and the second aCHARACTERoutput parameter containing the value, for example,RUNcolorChooser.w (OUTPUT lOK, OUTPUT cValue).- If the
lookup_type = PROC, then thelookup_valuefield specifies the relative path and filename of an external procedure to be run from the property sheet at initialization, which returns a delimited list of list-item-pairs.design_only— If thisLOGICALfield is set toYES, then this attribute is only modifiable at design time, not at run time. The default isNO.system_owned— If thisLOGICALfield is set toYES, this attribute can only be modified by users with a system-owned flag in their privilege definition. Certain attributes are required for the application to function correctly, and these are set tosystem_ownedto prevent accidental deletion. Only users classified as able to maintainsystem_ownedinformation can manipulate this data. In many cases, the actual attribute label must match to a valid Progress-supported SmartObject property.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |